package com.rowmapper;

import com.dto.DeptDto;
import com.dto.UserDto;
import org.springframework.jdbc.core.RowMapper;

import java.sql.ResultSet;
import java.sql.SQLException;

public class DeptRowMapper implements RowMapper<DeptDto> {
    @Override
    public DeptDto mapRow(ResultSet rs, int rowNum) throws SQLException {

        return new DeptDto(rs.getInt(1),rs.getString(2));
    }
}
